/**
 * 
 */
package com.ekingstar.framework.action;

import org.apache.struts2.config.Action;

import com.opensymphony.xwork2.ActionSupport;
import com.ekingstar.framework.domain.Role;
import com.ekingstar.framework.service.IRoleService;

/**
 * 
 *
 */
@Action(name="view",namespace="/role")
public class ViewRoleAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IRoleService roleService;
	
	public Role getRole() {
		return role;
	}
	public void setRole(Role role) {
		this.role = role;
	}
	public void setRoleService(IRoleService roleService) {
		this.roleService = roleService;
	}


	private Role role;
	
	
	public String execute(){
		if (role != null && role.getId() !=null){
			role = roleService.viewRole(role.getId());
		}
		return "input";
	}
	
	
}
